﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ketnoidulieu
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }
        clssQLDiem obj = new clssQLDiem();
        DataSet ds = new DataSet();
        private void Form2_Load(object sender, EventArgs e)
        {
            
            ds = obj.laydulieunhieubang();
            foreach (DataTable dt in ds.Tables)
                cbbdslop.Items.Add(dt.TableName);
        }

        private void cbbdslop_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cbbdslop.SelectedIndex != -1)
                dgv1.DataSource = ds.Tables[cbbdslop.SelectedIndex];
        }
    }
}
